apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ name }}
  labels:
    app: {{ name }}
spec:
  replicas: 1
  selector:
    matchLabels:
      app: {{ name }}
  template:
    metadata:
      labels:
        app: {{ name }}
    spec:
      containers:
        - name: {{ name }}
          image: {{ image }}
          imagePullPolicy: "Always"
          ports:
          - containerPort: 8080
          readinessProbe:
            httpGet:
              path: /
              port: 8080
            initialDelaySeconds: 10
            periodSeconds: 1
          resources:
            requests:
              cpu: "100m"
            limits:
              cpu: "100m"
---
apiVersion: v1
kind: Service
metadata:
  name: {{ name }}
spec:
  selector:
    app: {{ name }}
  ports:
    - protocol: TCP
      port: 8080
      targetPort: 8080
  type: LoadBalancer
